/*
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */
package com.guet.careapp.pojo;

import com.guet.careapp.pojo.TUserUnderGuardiansInfo;

import java.io.Serializable;
import java.math.BigInteger;
import javax.persistence.Basic;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.Lob;
import javax.persistence.ManyToOne;
import javax.persistence.NamedQueries;
import javax.persistence.NamedQuery;
import javax.persistence.Table;
import javax.validation.constraints.Size;
import javax.xml.bind.annotation.XmlRootElement;

/**
 *
 * @author LXM
 */
@Entity
@Table(name = "t_service_alarmclock_info")
@XmlRootElement
@NamedQueries({
    @NamedQuery(name = "TServiceAlarmclockInfo.findAll", query = "SELECT t FROM TServiceAlarmclockInfo t"),
    @NamedQuery(name = "TServiceAlarmclockInfo.findById", query = "SELECT t FROM TServiceAlarmclockInfo t WHERE t.id = :id"),
    @NamedQuery(name = "TServiceAlarmclockInfo.findByTime", query = "SELECT t FROM TServiceAlarmclockInfo t WHERE t.time = :time")})
public class TServiceAlarmclockInfo implements Serializable {

    private static final long serialVersionUID = 1L;
    @Id
    @GeneratedValue(strategy = GenerationType.IDENTITY)
    @Basic(optional = false)
    @Column(name = "id")
    private Integer id;
    @Column(name = "time")
    private BigInteger time;
    @Lob
    @Size(max = 65535)
    @Column(name = "infomation")
    private String infomation;
    @JoinColumn(name = "ug_id", referencedColumnName = "ug_id")
    @ManyToOne
    private TUserUnderGuardiansInfo ugId;

    public TServiceAlarmclockInfo() {
    }

    public TServiceAlarmclockInfo(Integer id) {
        this.id = id;
    }

    public Integer getId() {
        return id;
    }

    public void setId(Integer id) {
        this.id = id;
    }

    public BigInteger getTime() {
        return time;
    }

    public void setTime(BigInteger time) {
        this.time = time;
    }

    public String getInfomation() {
        return infomation;
    }

    public void setInfomation(String infomation) {
        this.infomation = infomation;
    }

    public TUserUnderGuardiansInfo getUgId() {
        return ugId;
    }

    public void setUgId(TUserUnderGuardiansInfo ugId) {
        this.ugId = ugId;
    }

    @Override
    public int hashCode() {
        int hash = 0;
        hash += (id != null ? id.hashCode() : 0);
        return hash;
    }

    @Override
    public boolean equals(Object object) {
        // TODO: Warning - this method won't work in the case the id fields are not set
        if (!(object instanceof TServiceAlarmclockInfo)) {
            return false;
        }
        TServiceAlarmclockInfo other = (TServiceAlarmclockInfo) object;
        if ((this.id == null && other.id != null) || (this.id != null && !this.id.equals(other.id))) {
            return false;
        }
        return true;
    }

    @Override
    public String toString() {
        return "pojo.TServiceAlarmclockInfo[ id=" + id + " ]";
    }
    
}
